home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
- BASICAID
-
-
- THE BASIC PROGRAMMERS FRIEND
-
-
- VERSION 5.0
- FEB ,1987
-
-
-
-
-
-
- All RIGHTS RESERVED
-
-
- (SUPERSEDES V4.0 dated 1986)
-
-
-
-
-
-
-
- COPYRIGHT (c) 1983, 1984, 1985, 1986, 1987 by Downlink Systems Inc.
-
-
-
-
-
- This document describes the BASICAID Basic source enhancement system,
- version 5.00, which was created by Downlink Sys. in FEBRUARY of 1987.
-
-
- INTRODUCTION
-
-
-
- BASICAID is the copyrighted property of Downlink Sys. Inc.
- You are granted a limited license to use , and to copy it and
- distribute it, provided that the following conditions are met:
-
- 1) No fee may be charged for such copying and distribution.
-
- 2) BASICAID may ONLY be distributed in its original, unmodified
- state.
-
-
- Contributions for the use of this program will be appreciated, and
- should be sent to:
-
- Downlink Systems Inc.
-
- c/o D. Conner
- 1377 K. STREET N.W.
- SUITE 189
- WASHINGTON D.C.
- 20005
-
- You may not use this product in a commercial environment or a
- governmental organization without paying a license fee of $25.
- Site licenses and commercial distribution licenses are available.
- A program disk and printed documentation are available for $25.
- See the order form in the back of this manual for more details.
-
-
- BASICAID is user supported software. This means that you may
- copy the shareware version freely and give the copies away to anyone
- you wish, at no cost. They in turn are requested to send in a contri-
- bution if they decide to use it.
-
- The user supported software concept (often referred to as shareware)
- is an attempt to provide software at low cost. The cost of offering a
- new product by conventional means is staggering, and hence dissuades
- many independent authors and small companies from developing and
- promoting their ideas. User supported software is an attempt to
- develop a new marketing channel, where products can be introduced at
- low cost.
-
- If user supported software works, then everyone will benefit. The
- user will benefit by receiving quality products at low cost, and by
- being able to "test drive" software thoroughly before purchasing it.
- The author benefits by being able to enter the commercial software
- arena without first needing large sources of venture capital.
-
- But it can only work with your support. We're not just talking about
- BASICAID, but about all user supported software. If you obtain a user
- supported program from a friend or colleague, and are still using it
- after a couple of weeks, then it is obviously worth something to you,
- and a contribution should be sent. Upon receipt of a contribution,
- you become a registered user and will receive a "full" feature, serial-
- ized version of BASICAID.
-
-
-
- This is a complete rewrite of version 4.x. BASICAID has been rewritten in
- QUICK BASIC 2.00. To support both monochrome and CGA monitors, the user
- interface has been changed to use an enhanced version of BASWIND window
- routines. These WINDOW routines hopefully provide a common interface
- across monitor types. BASICAID takes advantage of pop up, pop over,
- pop list and general window type formats. The QUICK BASIC screen format has
- been followed. This was not initially intentionally done, but it evolved
- toward and to this "look and somewhat feel". There is no mouse support,
- at this time, for the window interface, but look for it later.
-
-
-
- !! NOTE NOTE NOTE !!
-
- Version 5.0 now allows ALL forms of stored basic programs to be used as input.
-
- ** The option to additionally process protected BASIC programs is available **
- ------------------------------
- ** only to Registered users **
- ------------------------
-
- !! This is not a demo version, its an rewrite of 4.0 !!
-
-
-
- Therefore the source is no longer being distributed, due to the confidential
- nature of the logic that duplicates the MS BASIC decryption routines!
-
- However, the decryption routine(s) are for sale for inclusions in your
- works, at a price to be negotiated at the time of sale.
-
- This version , 5.0, is now compatible with MS-BASIC 2.0 COMPILER and
- IBM BASIC 2.0 COMPILER, in that any program that will run under the DOS
- BASIC INTERPRETER can be processed by 'BASICAID'. Also command line
- RUNTIME options may be entered.
-
-
-
-
- Editorial comment:
-
- Contrary to PC-SIG'S statement that we Shareware authors make
- big bucks, Shareware as it exists is NOT working. We find that
- we to are guilty of the same abuse of other Shareware products.
-
- This attitude that PC-SIG and others give of Shareware being
- public domain is totally false and is/will cause Shareware
- software to cease to exist or take on a 'restricted usage'
- form. This is what we have been forced to do with past and
- all future Shareware products. A 'restricted usage' form of
- software will be released. All the features will be included
- but in a form as to entice users to register to get all the
- whistles, bells and additional features that are worth the
- registration fee.
-
- As an example, just the other day we had a MAJOR hardware vendor
- come by to give a demo of some of their products. They had the
- shareware comm program, Qmodem, listed in their document as a
- "public domain" freebee that they could give us to use with
- their async device. Can you believe the mentality of such a
- LARGE company. Obviously the 'something for nothing' approach
- to shareware is becoming the standard way of thinking.
-
- We believe in the free exchange of ideas for intellectual advance.
- We got to the power user level with the help of all the "public
- domain" programs, source listings and free exchange of information
- , and that is why we have tried to provide source to all our
- contributions to PD also.
-
-
- !! END COMMENT !!
-
-
-
-
- Have you ever acquired a basic program from a friend and spent a lot of
- time just trying to untangle the program logic and statements, of course you
- have.
-
- Since each persons programming style is different, such as spacing, inden-
- tation and such, you could use your time better if all programs were about
- the same style.
-
- Are you an optimization and speed nut, as we are, especially when running
- a program under the interpreter. We don't like to wait a second longer than
- necessary. Of course by now we use the BASIC COMPILER as much as possible,
- since we would rather wait 2 minutes than have to wait 20 minutes to see
- the results of our lost sleep.
-
- We have seen several packages , not all with the same functions or
- range,selling from 20 to 80 dollars. Well this is several years worth of
- work,to you for free ,if you desire.
-
- As a basic overview the program will, compress,a basic program and remove
- remarks, expand a program by that we mean it will separate multiple statements
- per basic line into one or more statements, generate cross references on
- program variables and basic reserved words, and probably the most important
- will generate a cross reference showing all references to a specific line number
- that was referenced by a GOTO,GOSUB,ELSE,THEN,ERL,RESTORE OR RESUME statement.
-
- You can then find all variables, areas of code and such that are not
- referenced (and remove for storage savings) as well as on overview of
- program flow to find out how the program got to a specific line number.
-
-
-
-
- EACH FUNCTIONAL OPTION OF THE PROGRAM IS DISCUSSED BELOW:
-
-
- 1). EXPAND A BASIC PROGRAM
- ----------------------
-
- Will expand a compressed program, one that has multiple
- BASIC statements per line, separated by a ":" into one or
- more uniquely numbered basic lines with one or more statements
- per line.
-
- During the expanding some text compression will be done,
- to remove extraneous spaces and such.
-
- Also an expanded listing can be requested, that will be printed
- during the expansion.
-
- An expanded, output disk file, called "TEMPFILE.BAS" will
- be created also. Rename the "TEMPFILE.BAS" if you want to save
- it as the new version of your program.
-
- Note that the input basic program being expanded must be
- sufficiently sequenced to allow the insertion of new lines
- or the program will end with such a message. For example,if
- there are 7 Basic statements on a line, separated by ":",
- then if the original program was numbered by 5'S, the program
- will separate the line into 6 more BASIC lines each with a
- line number 1 greater than the previous line number.
-
- If you are processing an unnumbered BASIC program, or one
- generated with unreferenced line numbers removed, a new line
- number will be assigned to the unnumbered statement.
-
-
-
-
- 2). COMPRESS A BASIC PROGRAM
- ------------------------
-
- Will compress text (remove extraneous spaces and ":" and such)
- as well as combine separate Basic lines into single lines with
- as many logical statements per line as possible, and optionally
- remove unreferenced line numbers from the compressed program
- for use with the '/n' option of the BASIC compiler.
-
- By logical, we mean that any "REMARK" or "IF" or "DATA" statements
- will not have lines added to them.
-
- Also any line referenced by a logic branch (GOTO,GOSUB..ECT) will
- not be appended to any other line.
-
- You may request a listing of the compressed program be produced
- during the compression run, but will slow the program down, unless
- you have a print spooler installed.
-
- A compressed program disk file, named "TEMPCOMP.BAS" is
- created. Don't forget to rename "TEMPCOMP.BAS" if you want it
- to be your new working version.
-
- Also for version 2.0 (and above), an expanded file ,"TEMPFILE.BAS",
- is also created to speed up the compress logic so that it will not
- have to repeat the expansion logic and do as much error checking.
-
- Also with version 3.0 , and above, if during compression you request
- that unreferenced line numbers be removed and the input basic program
- already has unnumbered lines or multiple statements per line,the expand-
- ed 'TEMPFILE' is written without line numbers on statements. What this
- allows is that you may input a BASIC program that is not sufficiently
- line numbered, so that during the temporary expansion process,the next
- assigned incremental line number would conflict with an already coded
- statement.
-
-
-
-
-
- 3). DATANAME AND RESERVED WORD CROSS REFERENCE
- ------------------------------------------
-
- Will print a cross reference of Basic reserved words (such as
- GOTO,PRINT,CALL..ect).
-
- Will print a cross reference (ascending on variable name) of all
- user defined program variables.
-
-
- This would be great for finding statements that define or modify
- a variable.
-
- Any type of BASIC explicit variable state ,such as "!" or "#" or
- "%" or "$" are ignored, only the variable name which consists of the
- characters "A-Z","." and "0-9" are considered a unique name.
-
- You may have noticed that a variable name may be defined as being
- one of several variable types. For example "A!" , "A#" , "A%", "A$"
- , "A(" where "A(" is part of a "DIM", would all be recognized to the
- cross reference as the same variable, but different by BASIC.
-
- By the way, you may define a variable with a terminating ".",
- to also make it unique. For example "SPACES" is a reserved word,
- but "SPACES." or "SPACES.$" or "SPACES.%" are processed by BASIC
- as user defined variables.
-
- ALSO YOU COULD HAVE THE FOLLOWING CODE AND IT WOULD WORK:
-
- 10 DIM A(10)
- 20 A=0
- 30 FOR A=1 TO 10
- 40 A(A)=A
- 50 NEXT A
- 60 END
-
- CONFUSING BUT NEAT, HUH.
-
-
-
-
-
- 4). LINE NUMBER CROSS REFERENCE
- ---------------------------
-
- Will produce a (ascending by line number) cross reference,
- listing any line number that was reference by another line number
- and the referencing line number.
-
- This line number cross reference table is also used in the
- option to compress a program. So that we don't throw away "REMARK"
- lines that are branched to..
-
- You should use the listing produced to change the program logic
- such that it does not branch to any non-executable BASIC statement.
-
- The "REMARKS" take up part of the "64K" that BASIC runs in, since
- they are stored exactly as seen on the screen, not in any tokenized
- form.
-
- Also not branching to "REMARKS" will allow the compress option
- to remove the statement from the output compressed file.
-
- The BASIC compiler maintains a link list of line numbers. If you
- do any type of "ON ERROR" checking in your BASIC program, each line
- number , under these conditions , results in 4 or more bytes being
- used in the ".OBJ" (object) file created by the compiler.You could see
- why compressing the production version of the program could result in
- memory and speed savings.A link list must be searched and if your
- program was 500 lines, then (500 * (4+)) bytes must be used just to
- maintain the line number list. Also if you run into the old "0 BYTES
- REMAINING" message, compressing with the option to remove unreferenced
- line numbers (especially with /E/X options) results in a large savings,
- such that many times you can write a large program..
-
-
-
-
- **************************************************************************
-
-
- MACHINE REQUIREMENTS: 256K MINIMUM
- --------------------- BASIC 2.1+
- MS/IBM BASIC Compiler 2.0
- MONOCHROME/CGA COLOR DISPLAY
- DISK DRIVE [REAL AND/OR VIRTUAL(RAM)]
- EPSON PRINTER (OPTIONAL)
-
-
- RUNNING THE PROGRAM:
- --------------------
-
- From the DOS prompt type in > BASICAID [optional parameters (see below)]
-
-
-
-
-
-
- ************* BASIC COMPILER 2.0 SUPPORT **************
-
- COMMAND LINE RUNTIME OPTIONS:
-
- >BASICAID [OPTION,OPTION]
-
-
- ;The [] indicates that options are not required, you do not
- enter the '[]'.
-
- ;any option that is correctly entered will be processed and
- you will not be prompted during program execution. This allows
- a batch file with symbolic parameters!
-
- OPTION FUNCTION
- ------- ---------------------------------------------
- FILENAME=path\filename This is the basic program to be processed,
- now full DOS path syntax is supported.
-
- OPTION=a-number For 'a-number', substitute a value of 1 to 5,
- as appears on opening menu.
-
- TEMPDISK=drive Specify the drive that the expanded file is to
- be created on.
-
- COMPDISK=drive Specify the drive that the compressed file is
- to be created on.
-
- SORTDISK=drive Specify the drive that the temporary line
- number cross-reference file is to be created on.
-
- LIST=YES/NO Print a listing corresponding to function being
- performed. Used during 'compress' or 'expand'
- option.
-
- REMOVE=YES/NO Remove unreferenced line numbers from the
- compressed program. note: basic compiler '/n'
- option required if this option selected.
-
- SHOW=YES/NO Display line number being processed. Tests show
- that screen i/o is Basics slowest function, about
- 25% decrease.
-
- NOBEEP=any-char. Turn off most all whistles and beeps during
- processing. Added for quiet office, remote and
- batch unattended processing.
-
- ABORT=YES/NO If any error condition, exit immediately to DOS
- or give operator chance to recover from error.
-
-
-
-
- NOTE:
- 1). 'drive' is any valid DOS drive letter
-
- 2). for a `YES/NO' reply, only the first letter is checked.
-
- 3). only valid options are scanned for on the command line.
-
- 4). options are validated during processing, an invalid option
- forces the program to get a valid reply from the keyboard
- operator.
-
- 5). if the program was invoked with command line options, program
- will process without waiting for any replies,even 'press enter
- to continue' prompts. This will allow complete unattended
- batch operations.
-
- 6). command line converted to all upper-case prior to scanning
- for keywords.
-
- 7). 'keywords' immediately followed by '='.
-
- 8). all 'keywords' separate by ','.
-
-
-
-
- ADDITIONAL COMMENTS:
- --------------------
-
- The printed cross reference listing may be redirected to a disk
- file. This way you can have a permanent cross reference file of
- the basic program.
-
- *** note: The cross reference disk file option is only
- available to registered users.
-
- *** note: With the unregistered Shareware version there is
- a restriction on the number of references that the
- program can maintain. This is sufficient for most
- small-to-medium sized Basic source programs.
-
-
- This conversion and rewrite of BASICAID to QUICK BASIC 2.00 was
- a time consuming effort. Every effort was made to provide a common
- and more 'user friendly' program interface. Error handling and
- recover was enhanced to better serve you, the user. The final
- product hopefully reflects our efforts to provide you with a
- 'fine quality tool' to use to increase your productivity.
-
- However, as with any major effort, our testing cannot be exhaustive
- enough, as we would want, to provide a 100% error free product.
-
- We welcome your comments, complaints and suggestions as to what
- is wrong, right or could be better. Again thanks and enjoy.
-
- ***************************************************************************
-
-
- IN CLOSING
- ----------
-
- See the registration form at the end of this documentation, if you
- want to become a registered user of the 'full featured' version of
- this product.
-
- THIS IS A PRODUCT of DOWNLINK SYSTEMS INC and A $25 CONTRIBUTION IS ASKED
- BUT IS NOT REQUIRED..PLEASE PASS THE PROGRAM ON IN ITS UNMODIFIED VERSION
- ONLY.
-
- WE HOPE THIS LITTLE CONTRIBUTION WILL HELP YOU.
-
-
-
- Appendix A - Ordering
-
-
-
-
- ORDER FORM
-
-
-
- Check which items you wish to purchase:
-
- (_) Noncommercial license for the use of BASICAID.
-
- (_) Commercial license for the use of BASICAID on __ computers.
-
- (_) Program update subscription service (not more than five
- updates, does not include trivial changes), $35/year.
-
- (_) Payment of $_____ is enclosed (check or money order).
-
-
- Signature: ________________________________
-
- _______________________________________________
- Name
-
- _______________________________________________
-
-
- _______________________________________________
- Address
-
- ______________________ ________ ____________
- City State Zip
-
-
- Send this completed form to:
-
- Downlink Systems Inc.
- c/o D. Conner
- 1377 K STREET N.W.
- SUITE 189
- WASHINGTON D.C. 20005
-
- For program disk orders outside the U.S., please add an additional $5,
- and enclose an international money order payable in U.S. currency.
-
- ======================== end of documentation ==============================